<div class="blazorise-codeblock">
<div class="csharp"><pre>
<span class="keyword">public</span> <span class="keyword">class</span> Student
{
    <span class="keyword">public</span> required <span class="keyword">string</span> Name { <span class="keyword">get</span>; init; }

    [SetsRequiredMembers]
    <span class="keyword">public</span> Student( <span class="keyword">string</span> name )
    {
        Name = name
    }
}
</pre></div>
</div>
